﻿<!-- #layout name=empty-->
<div id="basic-info">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="form-horizontal margin-bottom-15" data-bind="visible: isNew">
                <div class="form-group save-type">
                    <label class="control-label col-sm-3" for="ck-is-public">Share datasource</label>
                    <div class="col-sm-9">
                        <div class="checkbox">
                            <label>
                                <input id="ck-is-public" type="checkbox" data-bind="checked: isPublic" />
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group" data-bind="visible: isPublic()">
                    <label class="control-label col-sm-3" for="txt-method-name">Setting name</label>
                    <div class="col-sm-9">
                        <input type="text" id="txt-method-name" name="MethodName" class="form-control input-medium" placeholder="Name" data-bind="value:methodName, error: methodName, visible: isNew" />
                        <p class="form-control-static" data-bind="text: methodName, visible: !isNew()"></p>
                    </div>
                </div>
            </div>
            <!-- ko if: isFolder() || isProductType() -->
            <div class="wizard" data-toggle="wizard">
                <div class="wrapper">
                    <a class="wizard-nav-item active" href="javascript:;" data-step="choose-folder">Choose folder<b></b></a>
                    <a class="wizard-nav-item" href="javascript:;" data-step="configure">Configure<b></b></a>
                </div>
            </div>
            <!-- /ko -->
            <!-- ko if: isFolder() || isProductType() -->
            <div class="wizard-body" data-step="choose-folder" style="display: block;">
                <!-- ko if: folderListLoading -->
                <p data-bind="text: Kooboo.text.common.loading"></p>
                <!-- /ko -->
                <!-- ko if: !folderListLoading() -->
                <div id="using_json" class="margin-bottom-15" data-bind="visible: hasFolder() || hasProductType()"></div>
                <div data-bind="visible: !hasFolder() && !hasProductType()">
                    <div class="alert alert-info">
                        <p>Create your first folder and Refresh this dialog.</p>
                        <p>
                            <a data-bind="attr: {href: textContentsUrl}" href="" target="_blank" class="btn green">Create folder</a>
                            <a href="javascript:location.reload()" target="_self" class="btn btn-line">Refresh</a>
                        </p>
                    </div>
                </div>
                <!-- /ko -->
            </div>
            <!-- /ko -->
            <div class="wizard-body" data-step="configure" data-bind="style: {display: !!(isFolder() || isProductType()) ? 'none' : 'block' }">
                <div class="form-horizontal">

                    <!-- ko foreach: parameterBinding -->

                    <!-- ko if: value.controlType.toLowerCase() === "normal" -->
                    <!-- ko component: {
                        name: "control-string",
                        params: {key: value.displayName, value: value.binding}
                    } -->
                    <!-- /ko -->
                    <!-- /ko -->

                    <!-- ko if: value.controlType.toLowerCase() === "textarea" -->
                    <!-- ko component: {
                        name: "control-textarea",
                        params: {key: value.displayName, value: value.binding}
                    } -->
                    <!-- /ko -->
                    <!-- /ko -->

                    <!-- ko if: value.controlType.toLowerCase() === "checkbox" -->
                    <!-- ko component: {
                        name: "control-checkbox",
                        params: {key: value.displayName, value: value.binding}
                    } -->
                    <!-- /ko -->
                    <!-- /ko -->

                    <!-- ko if: value.controlType.toLowerCase() === "dictionary" -->
                    <!-- ko component: {
                        name: "control-dictionary",
                        params: {key: value.displayName, value: value.binding}
                    } -->
                    <!-- /ko -->
                    <!-- /ko -->

                    <!-- ko if: value.controlType.toLowerCase() === "collection" -->
                    <!-- ko component: {
                        name: "control-collection",
                        params: {key: value.displayName, value: value.binding}
                    } -->
                    <!-- /ko -->
                    <!-- /ko -->

                    <!-- ko if: value.controlType.toLowerCase() === "orderby" -->
                    <!-- ko component: {
                        name: "control-order",
                        params: {key: value.displayName, value: value.binding, fieldsOfCurrentFolder: $root.fieldsOfCurrentFolder}
                    } -->
                    <!-- /ko -->
                    <!-- /ko -->

                    <!-- ko if: value.controlType.toLowerCase() === "contentfilter" -->
                    <!-- ko component: {
                        name: "control-filter",
                        params: {key: value.displayName, value: value.binding, fieldsOfCurrentFolder: $root.fieldsOfCurrentFolder}
                    } -->
                    <!-- /ko -->
                    <!-- /ko -->

                    <!-- /ko -->
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    (function() {
        Kooboo.loadJS([
            "/_Admin/Scripts/kooboo/Guid.js",
            "/_Admin/Scripts/lib/jstree.min.js",
            "/_Admin/Scripts/lib/knockout.mapping.min.js",
            "/_Admin/Scripts/tableModel.js"
        ])
        Kooboo.loadCSS(["/_Admin/Styles/jstree/style.min.css"]);
    })()
</script>
<script src="/_Admin/View/Development/DataMethodSettingDialog.js"></script>